// sub_suzhou/allocationSituation/allocationSituation.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    bankId: '',
    bankName: '',
    fileName: '',
    agencyCode: '',
    allocationTrue: '',
    allocationFalse: '',
  },
  goEnterList(e) {
    console.log(e, '11')
    let haveDevice = e.currentTarget.dataset.havedevice
    console.log(haveDevice,'haveDevicehaveDevice')
    wx.navigateTo({
      url: `/sub_suzhou/enterpriseList/enterpriseList?fileName=${this.data.fileName}&agencyCode=${this.data.agencyCode}&bankName=${this.data.bankName}&bankId=${this.data.bankId}&haveDevice=${haveDevice}`,
    });
  },
  getList() {
    const params = {
      pageBO: {
        pageSize: 100,
        pageNum: 1,
      },
      searchParam: '',
      fileName: this.data.fileName,
      bankId: this.data.bankId,
      agencyCode: this.data.agencyCode,
    }
    console.log(params,'传的参数')
    getApp().globalData.request(
      '/map/getHaveDeviceAndNoDeviceCorp', {
        ...params
      },
      "POST"
    ).then(res => {
      this.setData({
        allocationTrue: res.data['已分配'],
        allocationFalse: res.data['未分配']
      })
      console.log(this.data.allocationTrue, 'res22');
      console.log(this.data.allocationFalse, 'res33');

    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(e) {
    console.log(e,'eeeee')
    this.setData({
      bankId: e.bankId,
      bankName: e.bankName,
      fileName: e.fileName,
      agencyCode: e.agencyCode,
    })
    this.getList()
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})